package dao

import "live-broadcast_07_23/global"

func AddFile[T any](data *T) {
	global.DB.Create(&data)
}

func GetOneFile[T any](where *T, data *T) {
	global.DB.Where(where).Limit(1).Find(&data)
}

func GetListFile[T any](where *T, data *[]T) {
	global.DB.Where(where).Find(&data)
}

func DeleteFile[T any](data *T) {
	global.DB.Delete(&data)
}
